import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
import java.util.stream.Collectors;

public class testStream implements test4<Integer> {
    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        for (int i = 0; i < 5; i++) {
            list.add(i);
        }
        list.forEach(System.out::print);
        //

        //
        List<Integer> list1 = list.stream().map(integer -> integer * integer).filter(integer -> integer>10).distinct().collect(Collectors.toList());
        list1.forEach(System.out::println);
        Consumer<String> consumer=System.out::println;
        consumer.accept("两处相思同淋雪，此生也算共白头");
    }

    @Override
    public Integer test(Integer integer) {
        return integer;
    }
}
